Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type error #27

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Fix type error #27

merged 2 commits into from
Oct 17, 2024

Conversation

kevinheavey
Copy link
Owner

Fixes error from #25 and adds tsc to lint script so this doesn't happen again

@kevinheavey
Copy link
Owner Author

kevinheavey commented Oct 17, 2024

Looks like there's another error from some previous PR:

error TS2344: Type 'AllEvents<IDL>[number]' does not satisfy the constraint 'IdlEvent'.

No error on my machine though

@Woody4618
Copy link
Contributor

Did i break anything? Looks like you reverted the error change from two days ago. The tests on that were green. Im also getting the AllEvents[number] error locally. I can try debug it.

@kevinheavey
Copy link
Owner Author

Yeah somehow the tests are more permissive than tsc itself. The SendTransactionError issue is fixed in this PR, and I've also added tsc to the lint script which is what makes this Anchor type error appear in CI.

Previously this error would only have surfaced in the release CI which runs tsc

@Woody4618
Copy link
Contributor

If you revert the error change it will only work for "@solana/web3.js": "<1.92.0" for "@solana/web3.js": ">1.92.0" the parameter needs to be an object. Thats why I updated the package.json file. Maybe you need to run yarn install locally for it to work?

@kevinheavey
Copy link
Owner Author

Ah right yeah maybe that's it lol

Will check later

@Woody4618
Copy link
Contributor

The other IDL error seems to come from anchor directly.
It goes away when i delete the discriminator from IdlEvent in the node modules. So not sure how to fix that in anchor-brankrun.

Only way i found to make the build work is ignoring it with
"skipLibCheck": true

Maybe you have more luck

@kevinheavey
Copy link
Owner Author

I can confirm #25 did not break anything, sorry for jumping the gun lol

@Woody4618
Copy link
Contributor

Did you figure out what the other Events error comes from? I couldnt figure it out sadly.

@kevinheavey
Copy link
Owner Author

I decided skipLibCheck is good enough for me

@kevinheavey kevinheavey merged commit 8e2d1bd into main Oct 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants